home *** CD-ROM | disk | FTP | other *** search
- /*
- NXImageRep.h
- Application Kit, Release 2.0
- Copyright (c) 1988, 1989, 1990, NeXT, Inc. All rights reserved.
- */
-
- #import <Foundation/NSObject.h>
- #import "NSPasteboard.h"
- #import "NSGraphics.h"
-
- /*
- * NX_MATCHESDEVICE indicates the value is variable, depending on the output
- * device. It can be the passed in (or received back) as the value of
- * numColors, bitsPerSample, or pixelsWide & pixelsHigh.
- */
-
- #define NSImageRepMatchesDevice (0)
-
- /*
- * Names of segments for EPS and TIFF files and app & document icons.
- */
-
- #define NSEPSSegment "__EPS"
- #define NSTIFFSegment "__TIFF"
- #define NSIconSegment "__ICON"
-
- @interface NSImageRep : NSObject
- {
- struct __repFlags {
- unsigned int hasAlpha:1;
- unsigned int numColors:3;
- unsigned int bitsPerSample:6;
- unsigned int dataSource:3;
- unsigned int dataLoaded:1;
- unsigned int isOpaque:1;
- unsigned int :0;
- } _repFlags;
- NSSize size;
- int _pixelsWide;
- int _pixelsHigh;
- int _gsaved;
- }
-
- - (BOOL)drawAt:(NSPoint)point;
- - (BOOL)drawIn:(NSRect)rect;
- - (BOOL)draw;
- - setSize:(NSSize)aSize;
- - (NSSize)size;
- - setAlpha:(BOOL)flag;
- - (BOOL)hasAlpha;
- - setOpaque:(BOOL)flag;
- - (BOOL)isOpaque;
- - setNumColors:(int)anInt;
- - (int)numColors;
- - setBitsPerSample:(int)anInt;
- - (int)bitsPerSample;
- - setPixelsWide:(int)anInt;
- - (int)pixelsWide;
- - setPixelsHigh:(int)anInt;
- - (int)pixelsHigh;
- - read:(NXTypedStream *)stream;
- - write:(NXTypedStream *)stream;
-
- + (NSArray *)imageUnfilteredFileTypes;
- + (NSArray *)imageFileTypes;
- + (NSArray *)imageUnfilteredPasteboardTypes;
- + (NSArray *)imagePasteboardTypes;
- + (BOOL)canLoadFromStream:(NXStream *)stream;
-
- + (BOOL)canInitFromPasteboard:(NSPasteboard *)pasteboard;
- - initFromPasteboard:(NSPasteboard *)pasteboard;
-
- @end
-
-
-